# -*- coding:utf-8 -*-
# @Time : 2022/1/28 上午9:18 
# @Author : zdy
# @File : importQT.py
# desc:

# package = 0
# if package == 0:
#     try:
#         # PyQt5
import PyQt5
from PyQt5 import QtGui, QtWidgets, QtCore
from PyQt5.QtCore import pyqtSignal, pyqtSlot as Slot, Qt, QObject, QTranslator, QLocale, QLibraryInfo, \
    QModelIndex, QItemSelectionModel, QCoreApplication, QSize, QMimeData
from PyQt5.QtGui import QPixmap, QIcon, QKeyEvent, QColor, QBrush, QPalette, QStandardItemModel, QKeySequence, \
    QPainter, QMouseEvent, QStandardItem, QDragEnterEvent, QDropEvent, QDrag, QPixmapCache, QCursor
from PyQt5.QtWidgets import QAction, QLabel, QDialog, QMessageBox, QApplication, QTreeWidgetItem, \
    QListWidgetItem, QFileDialog, QCheckBox, QScrollArea, QShortcut, QStyledItemDelegate, QLineEdit, \
    QDoubleSpinBox, QAbstractItemView, QTableView, QTableWidgetItem, QPushButton, QSizePolicy, QWidget, \
    QStyleOptionViewItem, QStyle, QMenu, QToolBar, QVBoxLayout, QItemDelegate, QColorDialog
from PyQt5.QtPrintSupport import QPrinter, QPrintDialog
from PyQt5 import QtSql
#     except ImportError:
#         print("导入包错误")

# else:
    # try:
    #     # PyQt5
# import PyQt5
# from PyQt5 import QtGui, QtWidgets, QtCore
# from PyQt5.QtCore import  Signal as pyqtSignal, Slot as Slot, Qt, QObject,QTranslator, QLocale, QLibraryInfo,\
#     QModelIndex, QItemSelectionModel, QCoreApplication, QSize, QMimeData
# from PyQt5.QtGui import QAction,QShortcut, QPixmap, QIcon, QKeyEvent,QColor, QBrush, QPalette, QStandardItemModel,QKeySequence,\
#     QPainter,QMouseEvent, QStandardItem, QDragEnterEvent, QDropEvent, QDrag, QPixmapCache, QCursor
# from PyQt5.QtWidgets import  QLabel,QDialog, QMessageBox, QApplication,QTreeWidgetItem, \
#     QListWidgetItem, QFileDialog, QCheckBox,QScrollArea,  QStyledItemDelegate, QLineEdit, \
#     QDoubleSpinBox, QAbstractItemView, QTableView,QTableWidgetItem, QPushButton,QSizePolicy, QWidget, \
#     QStyleOptionViewItem, QStyle, QMenu, QToolBar, QVBoxLayout, QItemDelegate, QColorDialog

# from PyQt5.QtPrintSupport import QPrinter, QPrintDialog
# from PyQt5 import QtSql
    # except ImportError:
    #     print("导入包错误")

def convertPyDate(t):
    if package ==0:
        return t.toPyDateTime()
    else:
        return t.toPython()
